﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace test_fichiers.Models
{
    public class FilesModel : INotifyPropertyChanged
    {
        string m_path;
        string m_name;
        string m_extension;

        public string Path
        {
            get { return (m_path); }
            set
            {
                if (m_path != value)
                {
                    m_path = value;
                    OnPropertyChanged("Path");
                }
            }
        }
        public string Name
        {
            get { return (m_name); }
            set
            {
                if (m_name != value)
                {
                    m_name = value;
                    OnPropertyChanged("Name");
                }
            }
        }
        public string Extension
        {
            get
            {
                return (m_extension);
            }

            set
            {
                if (m_extension != value)
                {
                    m_extension = value;
                    OnPropertyChanged("Extension");
                }
            }
        }

		public FilesModel(string _path, string _name, string _extension)
		{
			m_path = _path;
			m_name = _name;
			m_extension = _extension;
		}

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string _name)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(_name));
        }

        #endregion
    }
}
